const _form = this.getApiPage().retrievePlugin('base-forms')
const panel = this.pageObj.getApiWidgetByAliasName('event-panel')?.widgetObj
const queryManage = this.pageObj.getApiWidgetByAliasName('queryManage')?.widgetObj
const value = _form.getFormData('form_12')
this.getApiPage().setVariables([{ name: 'event_search', value: value.search }])
const prefix = this.pageObj.getVariables().find(v => v.name === "environmentType")?.value;
const data = {
    pageNum: 1,
    pageSize: 10,
    eventTitle: value.search
}

const panelType = this.getApiPage().getVariables().find(v => v.name === 'panelType')?.value
console.log('panelType', panelType)
const process = this.getApiPage().getVariables().find(v => v.name === 'whetherProcess')?.value
console.log('whetherProcess', process)


if (+panelType === 0 || !panelType) {
    queryManage.queryDrillNews(process, value.search).then(res => {
        const expand = panel.getExpandSelected()
        expand.clear()
        panel.setData([{data: res}])
        panel.render()
    })
} else {
    queryManage.queryDrillGroup(panelType, process, value.search).then(res => {
        const expand = panel.getExpandSelected()
        expand.clear()
        panel.setData([{data: res}])
        panel.render()
    })
}

